package tech.aister.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import teach.aistar.mapper.UserMapper;
import teach.aistar.pojo.User;

/**
 * 本来用来演示: 用户业务逻辑层接口的实现类 - 负责具体的实现
 *
 * @author success
 * @date 2025/3/3 11:22:54
 */
@Service
public class UserServiceImpl implements UserService{
    //service层需要调用mapper层
    @Autowired
    private UserMapper userMapper;

    @Override
    public User findByEmail(String email) {
        //1. 调用mapper层的根据邮箱查找用户,如果找不到返回null
        User user = userMapper.getByEmail(email);
        return user;
    }
}
